#include <string>
#include "Material.h"
#include "Factory.h"

namespace Engine
{
	Material::Material(const Colour& amb, const Colour& dif, const Colour& spc, float shine):
	m_ambience(amb), m_diffuse(dif), m_specular(spc), m_shininess(shine){}

	void Material::Bind()
	{
		//setting ambient light
		glMaterialfv(GL_FRONT, GL_AMBIENT, m_ambience.ToArray());

		//setting diffuse light
		glMaterialfv(GL_FRONT, GL_DIFFUSE, m_diffuse.ToArray());

		//setting up specular light
		glMaterialfv(GL_FRONT, GL_SPECULAR, m_specular.ToArray());

		//setting shininess
		glMaterialf(GL_FRONT, GL_SHININESS, m_shininess);
	}
}
